void recursion2(int array[], int start, int end){
    if(start>=end){
        return;
    }
    int mid=array[end];
    int left=start,right=end-1;
    int temp;
    while(left<right){
        while(array[left]<mid && left<right){
            left++;
        }
        while(array[right]>=mid && left<right){
            right--;
        }
        temp=array[left];
        array[left]=array[right];
        array[right]=temp;
    }
    if(array[left]>=mid){
        temp=array[left];
        array[left]=mid;
        array[end]=temp;
    }else{
        left++;
    }
    if(left){
        recursion2(array,start,left-1);
    }
    recursion2(array,left+1,end);
}

void fast_sort(int array[], int len){
    recursion2(array,0,len-1);
}
